#include <stdio.h>
int num_digits(int n) {
    int count = 0;
    while (n > 0) {
        n /= 10;
        count++;
    }
    return count;
}
int main(void)
{
    int n;
    printf("输入正整数：");
    scanf("%d", &n);
    printf("数字的个数：%d\n", num_digits(n));
    return 0;
}